3.1.6 \(\int (a+b \tanh ^{-1}(c x)) \, dx\) [6]

Optimal. Leaf size=30 \[ a x+b x \tanh ^{-1}(c x)+\frac {b \log \left (1-c^2 x^2\right )}{2 c} \]

[Out]

a*x+b*x*arctanh(c*x)+1/2*b*ln(-c^2*x^2+1)/c

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6021, 266} \begin {gather*} a x+\frac {b \log \left (1-c^2 x^2\right )}{2 c}+b x \tanh ^{-1}(c x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTanh[c*x],x]

[Out]

a*x + b*x*ArcTanh[c*x] + (b*Log[1 - c^2*x^2])/(2*c)

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rubi steps

\begin {align*} \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=a x+b \int \tanh ^{-1}(c x) \, dx\\ &=a x+b x \tanh ^{-1}(c x)-(b c) \int \frac {x}{1-c^2 x^2} \, dx\\ &=a x+b x \tanh ^{-1}(c x)+\frac {b \log \left (1-c^2 x^2\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 30, normalized size = 1.00 \begin {gather*} a x+b x \tanh ^{-1}(c x)+\frac {b \log \left (1-c^2 x^2\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTanh[c*x],x]

[Out]

a*x + b*x*ArcTanh[c*x] + (b*Log[1 - c^2*x^2])/(2*c)

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 29, normalized size = 0.97

method result size
default \(a x +b x \arctanh \left (c x \right )+\frac {b \ln \left (-c^{2} x^{2}+1\right )}{2 c}\) \(29\)
derivativedivides \(\frac {c x a +b c x \arctanh \left (c x \right )+\frac {b \ln \left (-c^{2} x^{2}+1\right )}{2}}{c}\) \(32\)
risch \(a x +\frac {b x \ln \left (c x +1\right )}{2}-\frac {b x \ln \left (-c x +1\right )}{2}+\frac {b \ln \left (c^{2} x^{2}-1\right )}{2 c}\) \(42\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctanh(c*x),x,method=_RETURNVERBOSE)

[Out]

a*x+b*x*arctanh(c*x)+1/2*b*ln(-c^2*x^2+1)/c

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 30, normalized size = 1.00 \begin {gather*} a x + \frac {{\left (2 \, c x \operatorname {artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} b}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c*x),x, algorithm="maxima")

[Out]

a*x + 1/2*(2*c*x*arctanh(c*x) + log(-c^2*x^2 + 1))*b/c

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 42, normalized size = 1.40 \begin {gather*} \frac {b c x \log \left (-\frac {c x + 1}{c x - 1}\right ) + 2 \, a c x + b \log \left (c^{2} x^{2} - 1\right )}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c*x),x, algorithm="fricas")

[Out]

1/2*(b*c*x*log(-(c*x + 1)/(c*x - 1)) + 2*a*c*x + b*log(c^2*x^2 - 1))/c

________________________________________________________________________________________

Sympy [A]
time = 0.12, size = 27, normalized size = 0.90 \begin {gather*} a x + b \left (\begin {cases} x \operatorname {atanh}{\left (c x \right )} + \frac {\log {\left (c x + 1 \right )}}{c} - \frac {\operatorname {atanh}{\left (c x \right )}}{c} & \text {for}\: c \neq 0 \\0 & \text {otherwise} \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atanh(c*x),x)

[Out]

a*x + b*Piecewise((x*atanh(c*x) + log(c*x + 1)/c - atanh(c*x)/c, Ne(c, 0)), (0, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 156 vs. \(2 (28) = 56\).
time = 0.41, size = 156, normalized size = 5.20 \begin {gather*} b c {\left (\frac {\log \left (\frac {{\left | -c x - 1 \right |}}{{\left | c x - 1 \right |}}\right )}{c^{2}} - \frac {\log \left ({\left | -\frac {c x + 1}{c x - 1} + 1 \right |}\right )}{c^{2}} + \frac {\log \left (-\frac {\frac {c {\left (\frac {c x + 1}{c x - 1} + 1\right )}}{\frac {{\left (c x + 1\right )} c}{c x - 1} - c} + 1}{\frac {c {\left (\frac {c x + 1}{c x - 1} + 1\right )}}{\frac {{\left (c x + 1\right )} c}{c x - 1} - c} - 1}\right )}{c^{2} {\left (\frac {c x + 1}{c x - 1} - 1\right )}}\right )} + a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c*x),x, algorithm="giac")

[Out]

b*c*(log(abs(-c*x - 1)/abs(c*x - 1))/c^2 - log(abs(-(c*x + 1)/(c*x - 1) + 1))/c^2 + log(-(c*((c*x + 1)/(c*x -
1) + 1)/((c*x + 1)*c/(c*x - 1) - c) + 1)/(c*((c*x + 1)/(c*x - 1) + 1)/((c*x + 1)*c/(c*x - 1) - c) - 1))/(c^2*(
(c*x + 1)/(c*x - 1) - 1))) + a*x

________________________________________________________________________________________

Mupad [B]
time = 0.68, size = 27, normalized size = 0.90 \begin {gather*} a\,x+\frac {b\,\ln \left (c^2\,x^2-1\right )}{2\,c}+b\,x\,\mathrm {atanh}\left (c\,x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a + b*atanh(c*x),x)

[Out]

a*x + (b*log(c^2*x^2 - 1))/(2*c) + b*x*atanh(c*x)

________________________________________________________________________________________